package com.usian.admin.controller;

import com.usian.admin.service.UserLoginService;
import com.usian.api.admin.LoginControllerApi;
import com.usian.model.admin.dtos.AdUserDto;
import com.usian.model.common.dtos.ResponseResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 文件名： LoginController
 * 创作者： 闫俊涛
 *
 * @version 1.0
 * @Date 2022/6/26 18:57
 * @注释
 */
@RestController
@RequestMapping("api/admin/v1/login")
public class LoginController implements LoginControllerApi {

    @Autowired
    private UserLoginService userLoginService;


    @PostMapping("/in")
    @Override
    public ResponseResult login(AdUserDto dto) {
        return userLoginService.login(dto);
    }
}
